package org.liuxw.util;

import org.liuxw.bean.Source;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateFormatUtil {
    public static String getNowDate(String format){
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.format(new Date());
    }
/*
    public static void main(String[] args) {
        DateFormatUtil df = new DateFormatUtil();
        System.out.println(df.getNowDate("yyyy-MM-dd HH:mm:ss"));

        System.out.println(new Source().getCreateTime());
    }*/
}
